package com.neu.service;

import com.neu.dao.CheckOutDao;
import com.neu.pojo.CheckOut;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class CheckOutServiceImpl implements CheckOutService{
    @Autowired
    private CheckOutDao checkOutDao;
    @Override
    public List<CheckOut> getCheckOutList() {
        return checkOutDao.getCheckOutList();
    }

    @Override
    public int delCheckOut(int checkInNum) {
        return checkOutDao.delCheckOut(checkInNum);
    }

    @Override
    public int updateCheckOut(CheckOut checkOut) {
        return checkOutDao.updateCheckOut(checkOut);
    }

    @Override
    public int addCheckOut(CheckOut checkOut) {
        return checkOutDao.addCheckOut(checkOut);
    }

    @Override
    public int getCheckOutCount() {
        return checkOutDao.getCheckOutCount();
    }

    @Override
    public List<CheckOut> getCheckOutByPage(int page, int limit) {
        return checkOutDao.getCheckOutByPage((page-1)*limit,limit);
    }
}
